<div>
  <yu-panel title="流程仿真">
    <yu-xform v-model="formdata" related-table-name="reftable" form-type="search">
      <yu-xform-group :column="4">
        <yu-xform-item label="流程名称" placeholder="流程名称" ctype="input" name="flowName"></yu-xform-item>
        <yu-xform-item label="流程ID" placeholder="流程ID" ctype="num" name="flowId"></yu-xform-item>
      </yu-xform-group>
    </yu-xform>
    <yu-panel title="流程列表（运行中）">
      <el-table-x ref="reftable" :row-index="true" :base-params="baseParams" :data-url="urls.index" :table-columns="tableColumns"
        @custom-row-op="customRowOp">
      </el-table-x>
    </yu-panel>
    <yu-panel title="流程仿真运行结果">
      <el-table ref="logtable" :data="DoneNodes.slice((currentPage-1)*pageSize,currentPage*pageSize)" border style="width:100%;">
        <el-table-column prop="startTime" label="进行时间" ></el-table-column>
        <el-table-column prop="nodeId" label="节点ID" ></el-table-column>
        <el-table-column prop="nodeName" label="节点名称" ></el-table-column>
        <el-table-column prop="selectNode" label="下一节点ID" ></el-table-column>
        <el-table-column prop="nextNodeName" label="可选节点节点名称" ></el-table-column>
        <el-table-column prop="nextNode" label="可选节点ID" ></el-table-column>
        <el-table-column prop="nodeSign" label="路由运行结果" >
          <template scope="scope">
            <span style="color:green" v-if="scope.row.nodeSign == 'success' ">成功</span>
            <span style="color:orangered" v-if="scope.row.nodeSign == 'error' ">异常</span>
          </template>
        </el-table-column>
      </el-table>
      <el-pagination @size-change="SizeChange" @current-change="CurpageChange" :current-page="currentPage" :page-sizes="[20, 30, 50, 100]"
        :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="DoneNodes.length">
      </el-pagination>
    </yu-panel>
  </yu-panel>

  <!-- -->
  <el-dialog-x :title="viewTitle" :visible.sync="dialogVisible" width="650px" @close="Close">
    <el-row :gutter=5 style="margin-top: 20px;margin-bottom: 20px;font-size: 18px;">
      <el-col :span="12">仿真参数</el-col>
      <el-col :span="12">
        <el-row :gutter=10>
          <el-col :span="18">参数示例</el-col>
          <el-col :span="4" align="left">
            <el-button style="color:green" type="small" @click="click">点我</el-button>
          </el-col>
        </el-row>
      </el-col>
    </el-row>
    <el-row :gutter=10>
      <el-col :span="12">
        <el-input type="textarea" :rows="6" placeholder="(有需要用到的路由参数请写入本文本域，无则忽略)" v-model="inputParam"></el-input>
      </el-col>
      <el-col :span="12">
        <el-input type="textarea" disabled :rows="6" v-model="exampleParam" @click="click">
        </el-input>
      </el-col>
    </el-row>
    <div style="margin-top: 20px" align="right">
      <el-button type="primary" v-if="opType=='start'" @click="startFn">开始仿真</el-button>
      <el-button type="primary" v-if="opType=='submit'" @click="submitFn">下一步</el-button>
      <el-button type="primary" v-if="opType=='loding'" :loading="true">仿真进行中</el-button>
      <el-button type="primary" v-if="opType=='close'" @click="Close">查看日志</el-button>
    </div>
  </el-dialog-x>

  <el-dialog-x :title="Title" :visible.sync="dialogVisibleNext" width="650px">
    <el-form ref="form" label-width="80px">
      <el-form-item v-for="(node,index) in NextNodes">
        <el-col :span="8">
          <el-radio v-model="agreeRadio" :label="node.nodeId">{{node.nodeName}}</el-radio>
        </el-col>
      </el-form-item>
    </el-form>
    <div style="margin-top: 20px" align="center">
      <el-button type="primary" @click="returnNode">确 定</el-button>
      <el-button @click="cancel">取 消</el-button>
    </div>
  </el-dialog-x>


</div>